package com.jz.controller;

import com.jz.module.dto.WxLoginDto;
import com.jz.service.LoginService;
import com.jz.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/wx")
@RestController
public class WxLoginController {

    @Autowired
    private LoginService loginService;

    @RequestMapping("/login")
    public ResultUtil login(WxLoginDto dto) {
        return loginService.wxLogin(dto);
    }

    @RequestMapping("/register")
    public ResultUtil register(WxLoginDto dto) {
        return loginService.wxRegister(dto);
    }

    @RequestMapping("/upPsd")
    public ResultUtil upPsd(WxLoginDto dto) {
        return loginService.upPsd(dto);
    }
}
